package tk.mybatis.mapper.common.example.oper;

import java.util.Map;

/**
 * 
 * title: CustomOper.java 
 * 自定义
 * a=a+1*(2/3)
 * 
 * @author rplees
 * @email rplees.i.ly@gmail.com
 * @version 1.0  
 * @created Jul 6, 2016 10:08:09 AM
 */
public class CustomOper extends Oper {
	public CustomOper(String property, String oper, Map<String, String> propertyMap) {
		definition(property, propertyMap, oper);
	}
	
	protected void definition(String property,Map<String, String> propertyMap, String oper) {
		if(! propertyMap.containsKey(property)) {
			throw new RuntimeException("当前实体类不包含名为" + property + "的属性!");
		}
		
		this.column = propertyMap.get(property);
		this.condition = oper;
	}
}
